<template>
  <div>
    <h1>我是App组件</h1>
    <p>访问量是：{{ point | thousandSeparator }}</p>
    <p>价格1是：{{price1 | priceFormat(2)}}</p>
    <p>价格2是：{{price2 | priceFormat(3)}}</p>
    <Count></Count>
  </div>
</template>

<script>
import Count from "./components/Count.vue";
export default {
  components: { Count },
  data() {
    return {
      point: 2156423156131,
      price1:28,
      price2:38,
    };
  },
  filters: {
    thousandSeparator(value) {
      const reg = /(\d)(?=(\d{3})+$)/g;
      return String(value).replace(reg, "$1,");
    },
  },
};
</script>

<style>
</style>